package com.example.hyznbk.service;

import java.util.List;

import lancooUpLoad.ChangeStuFavouriteEntityResult;
import lancooUpLoad.ChangeStuFavouriteModel;
import lancooUpLoad.SaveAnswerEntityResult;
import lancooUpLoad.SaveDataJson;
import lancooUpLoad.SaveDataWrongJson;
import lancooUpLoad.SaveLearnedWrongQues;
import lancooUpLoad.SaveLearnedZSD;
import lancooUpLoad.SubmitAnswerEntityResult;
import lancooUpLoad.SubmitDataJson;
import lancooUpLoad.SubmitDataWrongJson;
import retrofit2.http.Body;
import retrofit2.http.POST;
import retrofit2.http.Query;
import rx.Observable;
import testPaperWrong.jsonWrong.GetQuesParams;
import testPaperWrong.jsonWrong.WrongQuesJson;
import testPaperWrongHistory.jsonWrongHistory.HistoryWrongQuesJson;
import testPaperWrongHistory.jsonWrongHistory.WrongQuesParams;

/**
 * Created by Administrator on 2017/8/10/010.
 */

public interface HttpPostServer {

     /*
    * 更改试题的收藏信息
    * */

    @POST("api/ZNBK/W_ZNBK_ChangeStuFavourite")
    Observable<ChangeStuFavouriteEntityResult> changeStuFavourite(@Body ChangeStuFavouriteModel changeStuFavouriteModel);


    /*
    * 保存试卷中单道试题信息
    * */

    @POST("api/ZNBK/W_ZNBK_SaveStuAnswer")
    Observable<SaveAnswerEntityResult> saveDataJson(@Query("answeredItemCount") int answeredItemCount,
                                                    @Query("duration") int duration,
                                                    @Body SaveDataJson SaveDataJson);


    /*
    * 保存错题试卷中单道试题信息
    * */

    @POST("api/ZNBK/W_ZNBK_SaveStuAnswer")
    Observable<SaveAnswerEntityResult> saveDataWrongJson(@Query("answeredItemCount") int answeredItemCount,
                                                    @Query("duration") int duration,
                                                    @Body SaveDataWrongJson SaveDataWrongJson);

    /*
    * 提交整份试卷
    * */
    @POST("api/ZNBK/W_ZNBK_SubmitStuAnswer")
    Observable<SubmitAnswerEntityResult> submitDataJson(@Query("answeredItemCount") int answeredItemCount,
                                                        @Query("duration") int duration,
                                                        @Query("schoolId") String schoolId,
                                                        @Query("term") String term,
                                                        @Body List<SubmitDataJson> ansList);

    /*
    * 提交错题整份试卷
    * */

    @POST("api/ZNBK/W_ZNBK_SubmitStuAnswer")
    Observable<SubmitAnswerEntityResult> submitDataWrongJson(@Query("answeredItemCount") int answeredItemCount,
                                                             @Query("duration") int duration,
                                                             @Query("schoolId") String schoolId,
                                                             @Query("term") String term,
                                                             @Body List<SubmitDataWrongJson> ansList);


    /*
    * 获取试题详细内容信息（基本复习错题 + 推荐题）
    * */
    @POST("api/ZNBK/W_ZNBK_GetQuesByID")
    Observable<List<WrongQuesJson>> basicReviewWrongJson(@Body GetQuesParams getQuesParams);

    /*
    * 获取历史推荐题
    * */
    @POST("api/ZNBK/W_ZNBK_GetHistoryQues")
    Observable<List<HistoryWrongQuesJson>> wrongQuesHistoryJson(@Body WrongQuesParams wrongQuesParams);


    /*
    *保存已学习的知识点到数据库
    * */
    @POST("api/ZNBK/W_ZNBK_SaveLearnedZSD")
    Observable<String> saveLearnedZsd(@Body SaveLearnedZSD saveLearnedZSD);

    /*
    *保存错题原题信息
    * */
    @POST("api/ZNBK/W_ZNBK_UpdateLearnedWrongQues")
    Observable<String> saveLearnedWrongQues(@Body SaveLearnedWrongQues saveLearnedWrongQues);


    /*
    *设置试卷模板
    * */
    @POST("api/ZNBK/W_ZNBK_SetPaperTemplet")
    Observable<String> setPaperTemplate(@Query("stuId") String stuId,@Query("stuName") String stuName,@Query("subjectId") String subjectId,
                                                         @Query("stageNo") String stageNo,@Query("templetId") String templetId,
                                                         @Query("templetName") String templetName,@Query("lastTempletId") String lastTempletId,
                                                         @Query("lastTempletName") String lastTempletName,@Query("zsdDomain") String zsdDomain);
}
